from routers.test import line_router
from routers.tett import router as tett_router
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from routers.dd import websocket_router as tt
app = FastAPI()



app.add_middleware(
    CORSMiddleware,
    allow_origins=["http://localhost", "http://localhost:8080"],  # 根据实际情况修改
    allow_credentials=True,
    allow_methods=["*"],
    allow_headers=["*"],
)
app.include_router(tett_router)
app.include_router(tt)
app.include_router(line_router)


if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)
